Generate reference test files#66
Merged
Merged
Conversation
Added several programs to e2e_test/Cairo basic - simple arithmetic operations bitwise - simple bitwise operations ecdsa - checks signature hash_pedersen - performs pedersen hashing hash_poseidon - performs poseidon hashing keccak - calculates hash Added script to generate test files in the test_files folder test_generate_files.sh Updated test.sh to generate and check proofs for all new programs NOTE: despite the fact that I've added keccak and bitwise programs. They do not work. Keccak alledgedly requires starknet os environemnt @m_kus might provide better explanation. For some reason bitwise operators are not implemented in cairo1 for felt252. There might a separate function for that, but I got really tired debugging rest of the cases that decided to leave it out of scope.
dmirgaleev
requested changes
Oct 5, 2024
Member
dmirgaleev
left a comment
There was a problem hiding this comment.
Really solid work! Thank you for that! Small changes so far to proceed with testing:
| "range_check": [], | ||
| "ecdsa": [] | ||
| } | ||
| "trace_path": "/Users/baitcode/work/odhack/stone-packaging/test_files/fibonacci_trace.b", |
Member
There was a problem hiding this comment.
Suggested change
| "trace_path": "/Users/baitcode/work/odhack/stone-packaging/test_files/fibonacci_trace.b", | |
| "trace_path": "./fibonacci_trace.b", |
Can we use relative paths here? If yes, may I ask you to update for all occurrences?
Member
|
That's just beautiful! Excellent job! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes issue #33
Added several programs to e2e_test/Cairo
basic - simple arithmetic operations
bitwise - simple bitwise operations
ecdsa - checks signature
hash_pedersen - performs pedersen hashing
hash_poseidon - performs poseidon hashing
keccak - calculates hash
Added script to generate test files in the test_files folder test_generate_files.sh Updated test.sh to generate and check proofs for all new programs
NOTE: despite the fact that I've added keccak and bitwise programs. They do not work. Keccak alledgedly requires starknet os environemnt @m-kus might provide more accurate explanation. For some reason bitwise operators are not implemented in cairo1 for felt252. There might a separate function for that, but I got really tired debugging rest of the cases that decided to leave it out of scope.
While implementing this I realised that I should've probably created test matrix with layouts in columns and builtins in rows and try to tick as many points as possible, but, well, If only I knew where I'm going to fall.
I've struggled a lot to find a way to pass arguments to cairo program, and realised how to do that only today (almost at the end). I'd love to update programs to a more interesting examples, and happy to do that on request. For now I've decided to at least commit what has been done.